/*
 *  SDLCanvas.h
 *  KDTreeRayTracer
 *
 *  Created by steveca  on 10/04/09.
 *  Copyright 2009 __MyCompanyName__. All rights reserved.
 *
 */

#ifndef __RT_SDLCANVAS_H__
#define __RT_SDLCANVAS_H__

#include "SDL.h"
#include "Canvas.h"

namespace RTRT {

    /** Canvas
     * CPU and SDL based
     */
    class SDLCanvas : public Canvas 
    {
    public:
        SDLCanvas() 
            : m_mainSurface(NULL), m_pixelBuffer(NULL)
        {}
        SDLCanvas(const CanvasConfig& canvasCfg)
            : m_canvasCfg(&canvasCfg) 
        {}
        
        int create();
        int clean(unsigned int color);
        int display();
        int destroy();

    protected:
        SDL_Surface *m_mainSurface;    
    };
}

#endif